import {
	defineConfig
} from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
	plugins: [vue()],
	server: {
		proxy: {
			"/api/v1": { //request.js里面得baseURL
				target: "http://localhost:8888",
				changeOrigin: true, //是否跨域
				// rewrite: (path) => path.replace(/^\/api\v1/, ""), 
				ws: true,                       //是否代理 websockets
				// secure: true, //是否https接口
			},
		},
	},
})
